﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace MDCAdminTool.Controls
{
    public partial class SetHostConfigWin : Window
    {
        public string HostName { get; set; }
        public int CachePort { get; set; }
        public int NewCachePort { get; set; }
        public int ClusterPort { get; set; }
        public int CacheSize { get; set; }
        public int HighWM { get; set; }
        public int LowWM { get; set; }

        public SetHostConfigWin()
        {
            InitializeComponent();
            this.DataContext = this;
        }

        private void Apply_Click( object sender , RoutedEventArgs e )
        {
            NewCachePort = int.Parse(tbNewCachePort.Text);
            ClusterPort = int.Parse( tbClusterPort.Text );
            CacheSize   = int.Parse( tbCacheSize.Text );
            HighWM      = int.Parse( tbHighWM.Text );
            LowWM       = int.Parse( tbLowWM.Text );


            this.Hide();
        }

        private void Cancel_Click( object sender , RoutedEventArgs e )
        {
            this.Close();
        }
    }
}
